home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / GLUT / README.glut3 < prev    next >
Text File  |  1996-11-11  |  5KB  |  115 lines

  1.  
  2. CHANGES for GLUT API version 3
  3. -------------------------------
  4.  
  5. GLUT API version 3 should be (almost) fully compatible with the
  6. GLUT API version 2.  See the GLUT 3 specification for full details.
  7.  
  8. Please be aware of two obscure reasons that programs that worked
  9. under GLUT API version 2 may need slight modification for GLUT 3.
  10.  
  11.   1)  You are now _required_ to have a display callback registered
  12.       for any GLUT window displayed to the screen.  Otherwise a
  13.       fatal error is generated.  It would be a bug in your program
  14.       otherwise!  In conjunction with this, you can no longer
  15.       call glutDisplayFunc(NULL) to unregister a display callback.
  16.  
  17.   2)  It is a fatal error now to modify a GLUT pop-up menu while
  18.       menus are in use.  There were too many semantic problems with
  19.       changing menus that may be currently displayed.  To determine
  20.       if menus are in use, you can use the "menu use" callback registered
  21.       with glutMenuStatusFunc
  22.  
  23. Here are the GLUT API version 3 additions in more detail:
  24.  
  25.   void glutSetCursor(int cursor)
  26.   int glutGet(GLUT_WINDOW_CURSOR)
  27.  
  28.      Provides a way to set (and get) the window's cursor to one
  29.      of several enumerated cursor shapes including "none",
  30.      "stop-watch", "arrow", "crosshair", "pull left/up/down/etc.",
  31.      or "inherit".
  32.  
  33.   void glutFullScreen(void)
  34.  
  35.      Attempts to make the window as large as the window system
  36.      permits (ie, the screen size).  Borders will be automatically
  37.      disabled if possible.
  38.  
  39.   void glutMenuStatus(void (*)(int status, int x, int y))
  40.  
  41.      The existing glutMenuState routine's callback did not
  42.      provide the X & Y location when the menu state changed
  43.      which made it impossible to correctly implement locate
  44.      highlight in conjunction with menus.  glutMenuStatus
  45.      returns the location.
  46.  
  47.    GLUT_BITMAP_HELVETICA_10
  48.    GLUT_BITMAP_HELVETICA_12
  49.    GLUT_BITMAP_HELVETICA_18
  50.  
  51.       New bitmap fonts in a nicer font at nicer sizes.
  52.  
  53.    int glutStrokeLength(void *, char *string)
  54.    int glutBitmapLength(void *, char *string)
  55.  
  56.       Given a font handle and a string, returns the length in
  57.       modelview units or pixels respectively for the string
  58.       if rendered with the font.
  59.  
  60.    int glutCurrentModifiers(void)
  61.  
  62.       When called from within a keyboard, special keyboard, mouse
  63.       button, or mouse callback, returns a bitmask representing
  64.       the modifier keys active when the event generating the callback
  65.       occured.  This will let you implement Alt+<key> combinations
  66.       and such.
  67.  
  68.    void glutEstablishOverlays(void)
  69.    void glutRemoveOverlays(void)
  70.    void glutOverlayDisplayFunc(void (*func)(void))
  71.    void glutPostOverlayRedisplay(void)
  72.    void glutUseLayer(GLenum layer)
  73.    void glutLayerGet(GLenum type)
  74.    void glutShowOverlay(void)
  75.    void glutHideOverlay(void)
  76.  
  77.       This API provides a way to "add" an overlay to a GLUT window.
  78.       The overlay is like IRIS GL overlay support in that the overlay
  79.       completely overlaps the window.  You setup the layer with
  80.       glutEstablishOverlay.  You switch between the normal plane
  81.       and overlay using glutUseLayer.  You can register an independent
  82.       callback for redisplaying the overlay, or use a unified display
  83.       callback for both layers.
  84.  
  85.       I believe this is a very simple overlay facility that will be
  86.       readily useful for OpenGL programs wanting access to overlay
  87.       planes.
  88.  
  89.    GLUT_LUMINANCE
  90.  
  91.      This is a new display mode that is like OpenGL's basic RGBA
  92.      color model, but has no Green or Blue components (and Alpha
  93.      is optional).  The Red component represents single component
  94.      (or "luminance") data (between 0.0 and 1.0).  The component
  95.      is integerized to between 0 and glutGet(GLUT_WINDOW_COLORMAP_SIZE)-1
  96.      and looked up in a per-window color map.  GLUT's glutSetColor,
  97.      glutGetColor, and glutCopyColormap work on a GLUT_LUMINANCE
  98.      window.  The initial colormap of GLUT_LUMINANCE windows is
  99.      initialized to be a linear gray ramp.
  100.  
  101.      GLUT_LUMINANCE is very much like a color index window with
  102.      an RGBA rendering model.  GLUT_LUMINANCE should be useful for
  103.      scientific visualization.
  104.  
  105.      Only some platforms will support GLUT_LUMINANCE.  SGI's IMPACT
  106.      and InfiniteReality systems should provide GLUT_LUMINANCE
  107.      support, however while the GLUT version 3 API provides GLUT_LUMINANCE,
  108.      GLUT 3.0 does not implement GLUT_LUMINANCE support.
  109.  
  110.      Exact specifics of how GLUT_LUMINANCE operates are subject to
  111.      change.
  112.  
  113. Also there are a handful of minor bug fixes (of course).
  114.  
  115.